<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>店铺模板修改页  - ${web.name}${web.additionalTitle!}</title>
<link href="${root}/u/css/global.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/layout.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/memeber.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/buy.css" type="text/css" rel="stylesheet" />
<link href="${root}/u/css/collect.css" type="text/css" rel="stylesheet" />
<script src="${sysResRoot}/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});

function ajaxSubmit() {
	$.post("o_update.jspx", {
		"roott" : $("#roott").val(),
		"name" : $("#name").val(),
		"source" : $("#source").val()
	}, function(data) {
		if (data.success) {
			alert("保存成功");
		} else {
			alert(data.msg);
		}
	}, "json");
}
</script>
</head>
<body>
<form method="post" action="o_ajaxUpdate.jspx" id="jvForm" onsubmit="ajaxSubmit();return false;">
    <table width="100%" cellpadding="2" cellspacing="0" border="0">
    <tr>
    <td width="60" height="50" align="right">文件名：</td>
    <td>
      <input type="text" value="${template.filename}" readonly="readonly" size="40" class="address_input" style="width:200px;"/>
      按 ctrl+s 保存</td>
    </tr>
    <tr>
    <td></td>
    <td>
    <textarea id="source" wrap="off" name="source" style="width:90%;height:350px;" class="address_input" maxlength="1232896" onkeydown="if((event.keyCode==115||event.keyCode==83)&&event.ctrlKey){ajaxSubmit();return false;}">
    ${template.source!}
    </textarea>
    </td>
    </tr>
    <tr>
    <td height="50">&nbsp;</td>
    <td>
    <input type="hidden" id="name" name="name" value="${template.name!}"/>
    <input type="hidden" id="roott" name="roott" value="${roott!}"/>
    <input type="submit" value="提交" class="menu_ok"/>
    <input type="reset" value="重置" class="menu_ok"/>
    </td>
    </tr>
    </table>
</form>
<div class="clear"></div>
</body>
</html>